package com.jt.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

public class demo2 {
    private int age;
    private String name;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    private  int id;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
@Controller

class ASS{
    //localhost:8080/aff
    @RequestMapping("/aff")
    @ResponseBody
    public demo2 aff(){
        demo2 demo2=new demo2();
        demo2.setAge(12);
        demo2.setName("苏小姐");
        return demo2;
    }
}
